home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 July / 1984-07.d64 / begin corner_vic (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  89 lines

  1. 1 rem quilt squares vic
  2. 2 goto15
  3. 3 poke198,0:pokev,231:ford=1to50:next:pokev,0:return
  4. 4 pokea,32:pokea+1,32:pokea+22,32:pokea+23,32:p=1:return
  5. 5 pokea,160:pokea+1,160:pokea+22,160:pokea+23,160:return
  6. 6 pokea,32:pokea+1,233:pokea+22,233:pokea+23,160:return
  7. 7 pokea,160:pokea+1,105:pokea+22,105:pokea+23,32:return
  8. 8 pokea,223:pokea+1,32:pokea+22,160:pokea+23,223:return
  9. 9 pokea,95:pokea+1,160:pokea+22,32:pokea+23,95:return
  10. 10 a1=peek(a):a2=peek(a+1):a3=peek(a+22):a4=peek(a+23):return
  11. 11 pokea,a1:pokea+1,a2:pokea+22,a3:pokea+23,a4:return
  12. 12 pokea,79:pokea+1,80:pokea+22,76:pokea+23,122:return
  13. 13 pokea+m,p:pokea+1+m,p:pokea+22+m,p:pokea+23+m,p:return
  14. 14 fori=8054to8118:pokei,32:nexti:return
  15. 15 print"[147]quilt squares"
  16. 16 dims(16),q(16),r(16),qq(3)
  17. 17 print"use f1 to move to the quilt square desired, then press <return>."
  18. 18 print"fill in the sample    squares."
  19. 19 fori=1to16:reads(i),q(i),r(i):next
  20. 20 data7864,7703,79,7866,7705,160,7868,7707,233,7870,7751,105
  21. 21 data7908,7709,223,7910,7753,95,7912,7711,160,7914,7713,233
  22. 22 data7952,7757,105,7954,7715,223,7956,7759,95,7958,7717,160
  23. 23 data7996,7719,233,7998,7763,105,8000,7721,223,8002,7765,95
  24. 24 qq(1)=6:qq(2)=11:qq(3)=16:poke36878,15:v=36876:m=30720
  25. 25 a$="[207][208][207][208][207][208][207][208]":b$="[204][186][204][186][204][186][204][186]"
  26. 26 print"one color is white.   how many other colors, 1, 2, or 3?":gosub3
  27. 27 gete$:ife$=""then27
  28. 28 ife$<"1"ore$>"3"then27
  29. 29 n=val(e$)
  30. 30 fori=1ton
  31. 31 print"choose color";i
  32. 32 print" [144] [146]   [146]  [159] [146]  [156] [146]   [146]   [146]  [158] [146]"
  33. 33 print" 1  2  3  4  5  6  7":gosub3
  34. 34 gete$:ife$=""then34
  35. 35 ife$<"1"ore$>"7"then34
  36. 36 c(i)=val(e$):printtab(3*c(i)-2)"^"
  37. 37 ifc(i)=1thenc(i)=0
  38. 38 nexti
  39. 39 print"[147]"
  40. 40 fori=1to4:printtab(8)a$:printtab(8)b$:nexti
  41. 41 poke7703,79:poke7704,101:poke7725,99:poke7703+m,0:poke7704+m,0:poke7725+m,0
  42. 42 fori=2toqq(n):pokeq(i),r(i):nexti
  43. 43 fori=2to6:pokeq(i)+m,c(1):nexti
  44. 44 fori=7to11:pokeq(i)+m,c(2):nexti
  45. 45 fori=12to16:pokeq(i)+m,c(3):nexti
  46. 46 fort=1to16:gosub3:pokes(t),63
  47. 47 fori=1toqq(n):gosub3:p=peek(q(i)+m):ifi=1thenp=1
  48. 48 pokeq(i),32:pokeq(i),r(i)
  49. 49 gete$:ife$=""then48
  50. 50 ifasc(e$)=13then53
  51. 51 ife$<>"[133]"then48
  52. 52 nexti:goto47
  53. 53 a=s(t):oni gosub4,5,6,7,8,9,5,6,7,8,9,5,6,7,8,9
  54. 54 gosub13:nextt
  55. 55 print"press f1--change":printtab(6)"f7--print quilt":gosub3
  56. 56 gete$:ife$="[136]"then74
  57. 57 ife$<>"[133]"then56
  58. 58 gosub14
  59. 59 print"[145][145]press f7--no change":printtab(6)"f1--change":gosub3
  60. 60 fort=1to16:a=s(t):gosub10:gosub3:p=peek(a+m):ifp=1thenp=0:gosub13
  61. 61 gosub12:gosub11
  62. 62 gete$:ife$="[136]"thengosub11:goto73
  63. 63 ife$<>"[133]"then61
  64. 64 gosub12
  65. 65 fori=1toqq(n):gosub3:p=peek(q(i)+m)
  66. 66 pokeq(i),32:pokeq(i),r(i)
  67. 67 gete$:ife$=""then66
  68. 68 ifasc(e$)=13then71
  69. 69 ife$<>"[133]"then66
  70. 70 nexti:goto65
  71. 71 a=s(t):oni gosub4,5,6,7,8,9,5,6,7,8,9,5,6,7,8,9
  72. 72 gosub13
  73. 73 nextt:gosub14:print"[145][145][145][145][145]":goto55
  74. 74 fort=1to16:a=s(t):p=peek(a+m):gosub10
  75. 75 a=s(t)-184:gosub11:gosub13:a=s(t)-176:gosub11:gosub13
  76. 76 a=s(t)-8:gosub11:gosub13
  77. 77 nextt
  78. 78 fort=1to12:a=s(t):p=peek(a+m):gosub10
  79. 79 a=s(t)+168:gosub11:gosub13:a=s(t)+176:gosub11:gosub13
  80. 80 nextt
  81. 81 fort=1to16:a=s(t):p=peek(a+m):gosub10
  82. 82 ift/4=int(t/4)then86
  83. 83 a=s(t)-168:gosub11:gosub13:a=s(t)+8:gosub11:gosub13
  84. 84 a=s(t)+184:ift>12then86
  85. 85 gosub11:gosub13
  86. 86 nextt
  87. 87 print""
  88. 88 end
  89.